package cn.tedu.csmall.product.mapper;

import cn.tedu.csmall.product.pojo.entity.AttributeTemplate;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
public class AttributeTemplateMapperTets {
   @Autowired
  AttributeTemplateMapper  mapper;
   @Test
    void testInsert(){
       AttributeTemplate attributeTemplate=new AttributeTemplate();
       attributeTemplate.setName("手机配件");
       attributeTemplate.setPinyin("shoujipiejian");
       attributeTemplate.setKeywords("配件");
       attributeTemplate.setSort(0);
       int row=mapper.insert(attributeTemplate);
       System.out.println("row = "+row);
   }
   @Test
   void testdeleteById(){
      Long id=7L;
      int row= mapper.deleteById(id);
      System.out.println("row = "+row);
   }
}
